package com.hmall.client;

import com.hmall.common.pojo.Address;
import com.hmall.common.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * @Author: ahcfl
 * @Date: 2021年07月31日 8:33
 * @Description:
 */
@FeignClient("userservice")
public interface UserClient {

    @GetMapping("/address/{id}")
    Address findAddressById(@PathVariable("id") Long id);

    @GetMapping("/user/{id}")
    User queryUserById(@PathVariable("id") Long userId);

    @PostMapping("/user/update")
    Boolean updateBalance(@RequestBody Map map);
}
